$dir=`ls ./results_permutation`;
@dir = split("\n",$dir);
#print "@dir\n";
for($i=0;$i<@dir;$i++)
{
	print $i."\n";
	$dir[$i] =~ s/\t//g;
	$dir[$i] =~ s/\r//g;
	$dir[$i] =~ s/ //g;
	if($dir[$i] !~ m/^order/ && $dir[$i] ne "")
	{
		open(BUFF,"./results_permutation/$dir[$i]") or die "not able to read file\n";
		open(WRBUFF,">./results_permutation_onlyids/$dir[$i]") or die "not able to write\n";
		while(<BUFF>)
		{
			chomp($_);
			$_ =~ s/\"//g;
			@a = split("\t",$_);
			print WRBUFF $a[0]."\t".$a[1]."\n";
			#die;

		}
	}
}
close(BUFF);
close(WRBUFF);
